<template>
    <div>
        <x-header :left-options="{backText: ''}">工作计划<router-link to="/addPlan" class="creat"  slot="right"><img src="../../static/img/jia.png" alt=""></router-link></x-header>
        <schedule @getDate="changeDate"></schedule>
        <group>
            <group-title slot="title">{{project.date}}</group-title>
            <cell primary="content" value-align="left" is-link v-for="(item) in project.event" :key="item.id">
                <div class="introduce over">{{item.introduce}}</div>
                <div class="info">
                    <span>{{item.startTime}}</span>
                    <span>{{item.name}}</span>
                </div>
            </cell>
        </group> 
  </div>
</template>
<script>
    import Utils from '*/js/modules/utils'
    import Schedule from '@/components/schedule'
    import {Group,Cell,GroupTitle,XHeader} from 'vux'
    export default{
        components:{
            Schedule,Group,Cell,GroupTitle,XHeader
        },
        data(){
            return{
                project:{
                    date:Utils.formatDate(new Date()),
                    event:[
                        {
                            id:16,
                            startTime:"10:00",
                            name:'开发APP',
                            introduce:'悦通今天要完成计划模块'
                        },
                        {
                            id:17,
                            startTime:"11:00",
                            name:'开会',
                            introduce:'悦通进度报告会'
                        }
                    ]
                }
            }
        },
        methods:{
            changeDate:function(param){
                console.log(param);
                this.project.date=param;
            }
        }
    }
</script>
<style scoped>
    .creat{
        width:21px;
        height:21px;
        display: block;
    }
    .creat img{
        width:100%;
        height:100%;
        display: block;
    }
    .introduce{
        font:14px/30px "microsoft yahei";
        color:#333;
    }
    .info span{
        font:14px/20px "microsoft yahei";
        color:#333;
    }
    .vux-header{
        background:#2c8481;
    }

</style>
